﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using yiwei.Repository.Entity;

namespace yiwei.Repository.EntityConfig
{
    public class RelevanceMap : IEntityTypeConfiguration<Relevance>
    {
        public void Configure(EntityTypeBuilder<Relevance> builder)
        {
            builder.ToTable("Relevance");         
            builder.HasKey(c => c.Id);
            builder.Property(b => b.Key).HasColumnType("varchar(200)");
            builder.Property(b => b.FirstId).IsRequired();
            builder.Property(b => b.SecondId).IsRequired();
        }
    }
}
